import 'dart:async';

class OtaManagerEx{

  String chipRom = '';//芯片型号
  String chipVersion = '';//芯片版本号
  String softRom = '';//rom版本号
  String softVersion = '';//升级软件版本号
  String softSize = '';//升级软件大小

  final StreamController<int> progressController = StreamController.broadcast();
  Stream<int> get progress => progressController.stream.asBroadcastStream();
  StreamSink<int> get progressSink => progressController.sink;

  final StreamController<bool> inUpdateController = StreamController.broadcast();
  Stream<bool> get inUpdate => inUpdateController.stream.asBroadcastStream();
  StreamSink<bool> get inUpdateSink => inUpdateController.sink;

  OtaManagerEx._();

  static final OtaManagerEx _instance = OtaManagerEx._();
  static OtaManagerEx get instance => _instance;
}